package com.es.www.kyl.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * @author estranger
 */
@Data
@TableName(value ="user")
public class User extends BaseDomain implements java.io.Serializable {
    private static final long serialVersionUID = -4969976731535874793L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private String avatarUrl;

    private String openId;

    private String userPhone;

    private String userRole;

    private String perType;

    private Integer status;

    private Date lastLoginTime;

    public boolean isVipOrAdmin() {
        return "0".equals(this.userRole) || "2".equals(this.userRole);
    }

}